package com.canpany.servlet;

import java.io.IOException;
import java.util.ArrayList;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.canpany.dao.DoLink;
import com.daoskw.LinkDb;

public class ShowNewsServlet extends HttpServlet{

	@Override
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		
  		LinkDb dao1=new LinkDb();
  		ArrayList list=dao1.showthing();
  		request.setAttribute("lists",list);
  		request.getRequestDispatcher("index.jsp").forward(request, response);
  
	}

	@Override
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		doGet(request, response);
	}
	
}
